home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / xmasspak / vector / vector4.asm < prev    next >
Encoding:
Assembly Source File  |  1995-06-04  |  16.4 KB  |  817 lines

  1. ;
  2. ;  Line-Vector-routine v2.2
  3. ;
  4. ;  done 1995 by Capella/Escape
  5. ;  this routine is only for Escape-usage .... DON'T SPREAD!!!!
  6. ;
  7.  
  8. ideal
  9. model large
  10. p386n
  11. stack 256
  12.  
  13. assume cs:coding
  14.  
  15. points = 18+48             ; Anzahl Punkte
  16. areas = 18+48            ; Anzahl Linien
  17.  
  18. ;-------------------------------------
  19. macro  setcol   backcol
  20.  
  21.        mov dx,03c8h
  22.        xor al,al
  23.        out dx,al
  24.        inc dx
  25.        mov al,backcol
  26.        out dx,al
  27.        out dx,al
  28.        out dx,al
  29.  
  30. endm
  31. ;-------------------------------
  32. macro  setpage newpage
  33.  
  34.        mov dx,03d4h
  35.        mov ax,newpage
  36.        out dx,ax
  37.  
  38. endm
  39. ;-------------------------------
  40.  
  41. segment  coding
  42.  
  43. start:     mov ax,data1
  44.            mov ds,ax
  45.            assume ds:data1
  46.  
  47.            mov ax,0a000h
  48.            mov es,ax
  49.            assume es:0a000h
  50.  
  51.            call set320400
  52.  
  53.            mov ax,0a800h
  54.            mov es,ax
  55.            assume es:0a800h
  56.            
  57. main:      call  rotate_x       
  58.            call  rotate_y
  59.            call  rotate_z
  60.            
  61.            call transform
  62.            
  63.            mov [ds:color],1         ; Objekt auf Seite 2 darstellen
  64.            mov di,offset _2dpoints
  65.            call draw_obj
  66.            
  67.            setpage 800ch           ; Seite 2 an
  68.            
  69.            mov dx,03dah
  70. wb1:       in al,dx
  71.            test al,8
  72.            jne wb1
  73. wb2:       in al,dx
  74.            test al,8
  75.            je wb2
  76.  
  77.            mov ax,0a000h
  78.            mov es,ax
  79.            assume es:0a000h
  80.            
  81.            mov [ds:color],0        ; Objekt auf Seite 1 löschen
  82.            mov di,offset old2d    
  83.            call draw_obj
  84.            
  85.            call get_oldpos         ; Positionen von Seite 2 retten
  86.            
  87.           ; add [ds:xw],2
  88.           ; add [ds:yw],2
  89.           ; add [ds:zw],2
  90.            
  91.            call rotate_x        
  92.            call rotate_y
  93.            call rotate_z
  94.            
  95.            call transform
  96.            
  97.            mov [ds:color],1        ; Objekt auf Seite 1 darstellen
  98.            mov di,offset _2dpoints
  99.            call draw_obj
  100.            
  101.            setpage 000ch           ; Seite 1 an
  102.        
  103.            mov dx,03dah
  104. wb3:       in al,dx
  105.            test al,8
  106.            jne wb3
  107. wb4:       in al,dx
  108.            test al,8
  109.            je wb4
  110.  
  111.            mov ax,0a800h
  112.            mov es,ax
  113.            assume es:0a800h
  114.            
  115.            mov [ds:color],0        ; Seite 2 löschen
  116.            mov di,offset old2d
  117.            call draw_obj
  118.            call get_oldpos         ; Positionen von Seite 1 retten
  119.            
  120.            add [ds:xw],2        ; Neue Winkel berechnen
  121.            add [ds:yw],4
  122.            add [ds:zw],2
  123.            
  124. warte:     in al,60h            ; Auf 'ESCAPE'-Taste warten
  125.            cmp al,01
  126.            jne main
  127.  
  128.            
  129. exit:      mov ax,0003h
  130.            int 10h
  131.            mov ax,4c00h
  132.            int 21h
  133.  
  134. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  135. ; ROTATIONS-ROUTINE / dreht die 3d-koordinaten in x,y und z-richtung
  136. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  137.  
  138. proc  rotate_x    NEAR
  139.      
  140.      mov   si,offset xpos
  141.      mov   di,offset _3dpoints
  142.      mov   cx,points
  143.  
  144. rotx_it:
  145.      push  cx
  146.      
  147.      mov   ax,[ds:zw]       
  148.      call  cosinus
  149.      imul  [word ds:si]
  150.      mov   cx,dx
  151.      mov   ax,[ds:zw] 
  152.      call  sinus
  153.      imul  [word ds:si+2*points]
  154.      sub   dx,cx
  155.      sal   dx,1
  156.      sal   dx,1
  157.      mov   [ds:di],dx  
  158.  
  159.      mov   ax,[ds:zw]       
  160.      call  sinus
  161.      imul  [word ds:si]
  162.      mov   cx,dx
  163.      mov   ax,[ds:zw] 
  164.      call  cosinus
  165.      imul  [word ds:si+2*points]
  166.      add   dx,cx
  167.      sal   dx,1
  168.      sal   dx,1
  169.      mov   [ds:di+2*points],dx                
  170.       
  171.      pop cx
  172.      add si,2
  173.      add di,2
  174.      dec cx
  175.      jnz rotx_it
  176.      ret
  177.  
  178. endp  rotate_x
  179.  
  180. proc  rotate_y    NEAR
  181.  
  182.      mov cx,points
  183.      mov si,offset xpos
  184.      mov di,offset _3dpoints
  185.  
  186. roty_it:     
  187.      push cx
  188.  
  189.      mov   ax,[ds:yw]       
  190.      call  cosinus
  191.      imul  [word ds:si]
  192.      mov   cx,dx
  193.      mov   ax,[ds:yw] 
  194.      call  sinus
  195.      imul  [word ds:si+4*points]
  196.      sub   dx,cx
  197.      sal   dx,1
  198.      sal   dx,1
  199.      mov   [ds:di],dx  
  200.  
  201.      mov   ax,[ds:yw]       
  202.      call  sinus
  203.      imul  [word ds:si]
  204.      mov   cx,dx
  205.      mov   ax,[ds:yw] 
  206.      call  cosinus
  207.      imul  [word ds:si+4*points]
  208.      add   dx,cx
  209.      sal   dx,1
  210.      sal   dx,1
  211.      mov   [ds:di+4*points],dx                
  212.       
  213.      pop cx
  214.      add si,2
  215.      add di,2
  216.      dec cx
  217.      jnz roty_it
  218.      ret
  219.  
  220. endp  rotate_y
  221.  
  222. proc  rotate_z    NEAR
  223.  
  224.      mov cx,points
  225.      mov si,offset xpos
  226.      mov di,offset _3dpoints
  227.  
  228. rotz_it:
  229.      
  230.      push cx
  231.  
  232.      mov   ax,[ds:xw]       
  233.      call  cosinus
  234.      imul  [word ds:si+2*points]
  235.      mov   cx,dx
  236.      mov   ax,[ds:xw] 
  237.      call  sinus
  238.      imul  [word ds:di+4*points]
  239.      sub   dx,cx
  240.      sal   dx,1
  241.      sal   dx,1
  242.      mov   [ds:di+2*points],dx  
  243.  
  244.      mov   ax,[ds:xw]       
  245.      call  sinus
  246.      imul  [word ds:si+2*points]
  247.      mov   cx,dx
  248.      mov   ax,[ds:xw] 
  249.      call  cosinus
  250.      imul  [word ds:di+4*points]
  251.      add   dx,cx
  252.      sal   dx,1
  253.      sal   dx,1
  254.      mov   [ds:di+4*points],dx                
  255.      
  256.      pop   cx
  257.      add si,2
  258.      add di,2
  259.      dec cx
  260.      jnz rotz_it
  261.      ret
  262.  
  263. endp  rotate_z
  264.  
  265. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  266. ; DRAW-OBJECT / zeichnet das object bestehend aus den 2d-koordinaten
  267. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  268.  
  269. proc  draw_obj    NEAR
  270.      
  271.      mov   si,offset lines
  272.      mov   cx,areas
  273.  
  274. Draw_Bonds:
  275.      
  276.      push  cx
  277.      xor   bh,bh
  278.      mov   bl,[ds:si]    
  279.      shl   bl,1
  280.      mov   ax,[ds:di+bx]        
  281.      mov   cx,[ds:di+2*points+bx] 
  282.      mov   [ds:x1],ax
  283.      mov   [ds:y1],cx
  284.      inc   si
  285.      mov   bl,[ds:si]
  286.      shl   bl,1
  287.      mov   ax,[ds:di+bx]        
  288.      mov   cx,[ds:di+2*points+bx]  
  289.      mov   [ds:x2],ax
  290.      mov   [ds:y2],cx
  291.      push  si
  292.      push  di
  293.      call  drawline
  294.      pop   di
  295.      pop   si
  296.      inc   si
  297.      pop   cx
  298.      dec cx
  299.      jnz  Draw_Bonds
  300.      ret
  301.  
  302. endp  draw_obj 
  303.  
  304. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  305. ; TRANSFORMATION-ROUTINE / rechnet die 3d-koord. in 2d koord. um
  306. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  307.  
  308. proc  transform     NEAR
  309.      
  310.          mov   cx,points
  311.          mov   di,offset _2dpoints
  312.          mov   si,offset _3dpoints
  313.  
  314. trans_it:mov   bx,[ds:si+4*points] 
  315.          sub   bx,[ds:dist]
  316.      
  317.          mov   ax,[ds:dist]
  318.          imul  [word ds:si]
  319.          idiv  bx            
  320.          sar   ax,1
  321.          sar   ax,1
  322.          sar   ax,1
  323.          sar   ax,1
  324.          add   ax,[ds:x_add]
  325.          mov   [ds:di],ax      
  326.      
  327.          mov   ax,[ds:dist]
  328.          imul  [word ds:si+2*points]
  329.          idiv  bx
  330.          sar   ax,1
  331.          sar   ax,1
  332.          sar   ax,1
  333.          sar   ax,1
  334.          add   ax,[ds:y_add]
  335.          mov   [ds:di+2*points],ax 
  336.      
  337.          add si,2
  338.          add di,2
  339.          dec cx
  340.          jnz trans_it
  341.          ret
  342.  
  343. endp  transform 
  344.  
  345. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  346. ; COSINUS-ROUTINE
  347. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  348.  
  349. proc  cosinus     NEAR
  350.  
  351.      add   ax,64
  352.  
  353.      push  bx
  354.      push  cx
  355.      push  si
  356.      
  357.      mov   bx,ax
  358.      shl   ax,1
  359.      and   ax,0ffh       
  360.      mov   si,offset sinustable
  361.      add   si,ax
  362.      mov   ax,[ds:si]     
  363.      clc
  364.      shl   bl,1         
  365.      jae   cos_pos
  366.      neg   ax            
  367. cos_pos:
  368.      pop   si
  369.      pop   cx
  370.      pop   bx
  371.      ret
  372.  
  373. endp  cosinus
  374.  
  375. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  376. ; SINUS-ROUTINE
  377. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  378.  
  379. proc  sinus    NEAR
  380.  
  381.      push  bx
  382.      push  cx
  383.      push  si
  384.      
  385.      mov   bx,ax
  386.      shl   ax,1
  387.      and   ax,0ffh       
  388.      mov   si,offset sinustable
  389.      add   si,ax
  390.      mov   ax,[ds:si]     
  391.      clc
  392.      shl   bl,1         
  393.      jae   sin_pos
  394.      neg   ax            
  395. sin_pos:
  396.      pop   si
  397.      pop   cx
  398.      pop   bx
  399.      ret
  400.  
  401. endp  sinus
  402.  
  403. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  404. ; DRAWLINE-ROUTINE / zieht eine linie von x1,y1 nach x2,y2 mit farbe col
  405. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  406.  
  407. proc  drawline   NEAR
  408.      
  409.      mov   ax,[ds:x1]
  410.      cmp   ax,[ds:x2]
  411.      jz    no_xadd
  412.      jmp   draw_it
  413.  
  414. no_xadd:
  415.      
  416.      mov   ax,[ds:y1]
  417.      cmp   ax,[ds:y2]
  418.      jnz   draw_it
  419.      
  420.      mov ax,[ds:x1]
  421.      mov bx,[ds:y1]
  422.      jmp   stop_line
  423.  
  424. draw_it:
  425.      
  426.      push  bp
  427.      mov   ax,[ds:x1]
  428.      mov   bx,[ds:y1]
  429.      push  ax
  430.      push  bx
  431.      mov   bx,4340h
  432.      mov   cx,[ds:x2]
  433.      sub   cx,ax
  434.      jge   deltax_1
  435.      mov   bl,48h
  436.      neg   cx
  437.  
  438. deltax_1:
  439.      
  440.      mov   dx,[ds:y2]
  441.      pop   si
  442.      push  si
  443.      sub   dx,si
  444.      jge   deltay_1
  445.      mov   bh,4bh
  446.      neg   dx
  447.  
  448. deltay_1:
  449.  
  450.      mov   si,offset line_add
  451.      mov   [word cs:si],bx
  452.      cmp   cx,dx
  453.      jge   deltax_2
  454.      mov   bl,90h
  455.      xchg  cx,dx
  456.      jmp   achse3
  457.  
  458. deltax_2:
  459.      
  460.      mov   bh,90h
  461.  
  462. achse3:
  463.      
  464.      mov   si,offset line_sub
  465.      mov   [word cs:si],bx
  466.      shl   dx,1
  467.      mov   bp,dx
  468.      sub   dx,cx
  469.      mov   di,dx
  470.      sub   dx,cx
  471.      pop   bx
  472.      pop   ax
  473.  
  474. line_loop:
  475.      
  476.      push  di
  477.      push  ax
  478.      push  dx
  479.      push  bx
  480.      push  cx
  481.      
  482.      push ax
  483.      mov ax,80
  484.      imul bx
  485.      pop cx
  486.      mov bx,cx
  487.      shr bx,1
  488.      shr bx,1
  489.      add ax,bx
  490.      mov si,ax
  491.  
  492.      and cl,3
  493.      mov ah,1
  494.      shl ah,cl
  495.      mov dx,03c4h
  496.      mov al,02h
  497.      out dx,ax
  498.  
  499.      mov al,[ds:color]
  500.      mov [es:si],al
  501.      
  502.      pop   cx
  503.      pop   bx
  504.      pop   dx
  505.      pop   ax
  506.      pop   di
  507.      cmp   di,0
  508.      jge   line_add
  509.  
  510. line_sub:
  511.      
  512.      inc   ax
  513.      inc   bx
  514.      add   di,bp
  515.      loop  line_loop
  516.      jmp   end_line
  517.  
  518. line_add:
  519.      
  520.      inc   ax
  521.      inc   bx
  522.      add   di,dx
  523.      loop  line_loop
  524.  
  525. end_line:
  526.      
  527.      pop     bp
  528.  
  529. stop_line:
  530.      
  531.      ret
  532.  
  533. endp  drawline 
  534.  
  535.  
  536.  
  537. proc  get_oldpos  NEAR
  538.  
  539.          mov cx,2*points
  540.  
  541.          mov si,offset _2dpoints
  542.          mov di,offset old2d
  543.  
  544. old_loop:mov ax,[ds:si]
  545.          mov [ds:di],ax
  546.          add si,2
  547.          add di,2
  548.          dec cx
  549.          jnz old_loop
  550.          
  551.          ret
  552.  
  553. endp  get_oldpos
  554.  
  555.  
  556. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  557. ; SET 320*400 Graphics-mode (based on 4 bitplane-splitting) 
  558. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  559.  
  560. proc  set320400  NEAR
  561.  
  562.               mov ax,0013h      
  563.               int 10h
  564.  
  565.               mov dx,03c4h
  566.               mov al,04h
  567.               out dx,al
  568.               inc dx
  569.               in al,dx
  570.               and al,11110111b
  571.               out dx,al
  572.               dec dx
  573.               
  574.               mov ax,0f02h
  575.               out dx,ax
  576.  
  577.               mov dx,03d4h
  578.               mov al,14h
  579.               out dx,al
  580.               inc dx
  581.               in al,dx
  582.               and al,10111111b
  583.               out dx,al
  584.               dec dx
  585.               mov al,17h
  586.               out dx,al
  587.               inc dx
  588.               in al,dx
  589.               or al,01000000b
  590.               out dx,al
  591.  
  592.               mov dx,03d4h
  593.               mov al,09h
  594.               out dx,al
  595.               inc dx
  596.               in al,dx
  597.               and al,01110000b
  598.               out dx,al
  599.               
  600.               mov dx,03c4h
  601.               mov ax,0f02h
  602.               out dx,ax
  603.  
  604.               mov ax,0a000h
  605.               mov es,ax
  606.               assume es:0a000h
  607.               
  608.               mov cx,64000      ; alle bitplanes auf beiden grafikseiten
  609.               xor di,di         ; löschen...
  610.               xor eax,eax
  611.               cld
  612.               rep stosd
  613.  
  614.               ret
  615.  
  616. endp  set320400
  617.  
  618.  
  619. ends  coding
  620.  
  621. segment  data1
  622.  
  623. ;
  624. ; OBJEKT DATEN
  625. ;
  626.  
  627. xpos  dw -400,-100,-300,-100,-300,-100,-400,-100 ;C
  628.       dw -800,-500,-700,-500,-700,-500,-800,-600,-800,-600,-800,-500 ;S
  629.       dw -1200,-900,-1100,-900,-1100,-1000,-1100,-1000,-1100,-900,-1200,-900 ;E
  630.  
  631.       dw 100,400,200,300,200,300,200,300,100,200,300,400 ; A
  632.       dw 500,800,600,700,600,700,600,800,500,600 ;P
  633.       dw 900,1200,1000,1200,1000,1100,1000,1100,1000,1200,900,1200 ;E
  634.  
  635. ypos  dw -350,-350,-200,-200,200,200,350,350     ;C
  636.       dw -350,-350,-200,-200,-100,-100,100,100,200,200,350,350 ;S
  637.       dw -350,-350,-200,-200,-100,-100,100,100,200,200,350,350 ;E
  638.  
  639.       dw -350,-350,-200,-200,-100,-100,100,100,350,350,350,350 ;A
  640.       dw -350,-350,-200,-200,-100,-100,100,100,350,350 ;P
  641.       dw -350,-350,-200,-200,-100,-100,100,100,200,200,350,350 ;E
  642.  
  643. zpos  dw 300,300,300,300,300,300,300,300         ;C
  644.       dw 300,300,300,300,300,300,300,300,300,300,300,300 ;S
  645.       dw 300,300,300,300,300,300,300,300,300,300,300,300 ;E
  646.  
  647.       dw 300,300,300,300,300,300,300,300,300,300,300,300 ;A
  648.       dw 300,300,300,300,300,300,300,300,300,300 ;P
  649.       dw 300,300,300,300,300,300,300,300,300,300,300,300 ;E
  650.  
  651. ;
  652. ; BINDUNGSLISTE FÜR DIE OBJEKT-PUNKTE
  653. ;
  654.  
  655. lines db 0,1         ;C
  656.       db 2,3
  657.       db 4,5
  658.       db 6,7
  659.       
  660.       db 0,6
  661.       db 1,3
  662.       db 2,4
  663.       db 5,7
  664.  
  665.       db 8,9         ;S
  666.       db 10,11
  667.       db 12,13
  668.       db 14,15
  669.       db 16,17
  670.       db 18,19
  671.  
  672.       db 8,14
  673.       db 9,11
  674.       db 10,12
  675.       db 13,19
  676.       db 15,17
  677.       db 16,18
  678.  
  679.       db 20,21   ;E
  680.       db 22,23
  681.       db 24,25
  682.       db 26,27
  683.       db 28,29
  684.       db 30,31
  685.  
  686.       db 20,30
  687.       db 21,23
  688.       db 22,24
  689.       db 25,27
  690.       db 26,28
  691.       db 29,31
  692.  
  693.       db 32,33  ;A
  694.       db 34,35
  695.       db 36,37
  696.       db 38,39
  697.       db 40,41
  698.       db 42,43
  699.  
  700.       db 32,40
  701.       db 33,43
  702.       db 34,36
  703.       db 35,37
  704.       db 38,41
  705.       db 39,42
  706.  
  707.       db 44,45  ;P
  708.       db 46,47
  709.       db 48,49
  710.       db 50,51
  711.       db 52,53
  712.  
  713.       db 44,52
  714.       db 45,51
  715.       db 46,48
  716.       db 47,49
  717.       db 50,53
  718.  
  719.       db 54,55  ;E
  720.       db 56,57
  721.       db 58,59
  722.       db 60,61
  723.       db 62,63
  724.       db 64,65
  725.  
  726.       db 54,64
  727.       db 55,57
  728.       db 56,58
  729.       db 59,61
  730.       db 60,62
  731.       db 63,65
  732.  
  733.  
  734.  
  735. ;
  736. ; DISTANZ VOM AUGE DES BETRACHTERS IN DEN 3D-RAUM
  737. ;
  738.  
  739. dist  dw 2000
  740.  
  741. ;
  742. ; SINUSTABELLE MIT 128 WERTEN
  743. ;
  744.  
  745. sinustable dw 0000h,0192h,0324h,04b5h,0646h
  746.            dw 07d6h,0964h,0af1h,0c7ch,0e06h,0f8dh
  747.            dw 1112h,1294h,1413h,1590h,1709h,187eh
  748.            dw 19efh,1b5dh,1cc6h,1e2bh,1f8ch,20e7h
  749.            dw 223dh,238eh,24dah,2620h,2760h,289ah
  750.            dw 29ceh,2afbh,2c21h,2d41h,2e5ah,2f6ch
  751.            dw 3076h,3179h,3274h,3368h,3453h,3537h
  752.            dw 3612h,36e5h,37b0h,3871h,392bh,39dbh
  753.            dw 3a82h,3b21h,3bb6h,3c42h,3cc5h,3d3fh
  754.            dw 3dafh,3e15h,3e72h,3ec5h,3f0fh,3f4fh
  755.            dw 3f85h,3fb1h,3fd4h,3fech,3ffbh,4000h
  756.            dw 3ffbh,3fech,3fd4h,3fb1h,3f85h,3f4fh
  757.            dw 3f0fh,3ec5h,3e72h,3e15h,3dafh,3d3fh
  758.            dw 3cc5h,3c42h,3bb6h,3b21h,3a82h,39dbh
  759.            dw 392bh,3871h,37b0h,36e5h,3612h,3537h
  760.            dw 3453h,3368h,3274h,3179h,3076h,2f6ch
  761.            dw 2e5ah,2d41h,2c21h,2afbh,29ceh,289ah
  762.            dw 2760h,2620h,24dah,238eh,223dh,20e7h
  763.            dw 1f8ch,1e2bh,1cc6h,1b5dh,19efh,187eh
  764.            dw 1709h,1590h,1413h,1294h,1112h,0f8dh
  765.            dw 0e06h,0c7ch,0af1h,0964h,07d6h,0646h
  766.            dw 04b5h,0324h,0192h
  767.   
  768. ;
  769. ; LINIEN-PUNKTE FÜR draw_obj-ROUTINE
  770. ;
  771.  
  772. x1      dw 0
  773. x2      dw 0
  774. y1      dw 0
  775. y2      dw 0
  776.  
  777. ;
  778. ; WINKEL FÜR DIE DREHUNGEN IN X,Y UND Z-RICHTUNG
  779. ;
  780.  
  781. xw      dw 0     
  782. yw      dw 0
  783. zw      dw 0
  784.  
  785.         db "ESCAPE"
  786.  
  787. ;
  788. ; PUFFER FÜR ROTIERTE 3D-KOORDINATEN
  789. ;
  790.  
  791. _3dpoints    dw 3*points DUP (1) ; gedrehte Koord.
  792.  
  793. ;
  794. ; PUFFER FÜR UMGERECHNETE 2D-KOORDINATEN
  795. ;
  796.  
  797. _2dpoints   dw 2*points DUP (1) ; 2D-Koordinaten
  798.      
  799. ;
  800. ; PUFFER FÜR ALTE 2D-KOORDINATEN
  801. ;
  802.  
  803. old2d       dw 2*points dup (0) ; Alte 2D-Koordinaten
  804.  
  805. ;
  806. ; 2D-POINTER FÜR POSITIONIERUNG AUF BILDSCHIRM
  807. ;
  808.  
  809. x_add    dw 160
  810. y_add    dw 200
  811.  
  812. color    db 1
  813.  
  814. ends  data1
  815.  
  816. end start
  817.